package com.atguigu.gmall.order.service.impl;

import com.atguigu.gmall.model.cart.CartInfo;
import com.atguigu.gmall.order.mapper.CartInfoMapper;
import com.atguigu.gmall.order.service.CartAsyncService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class CartAsyncServiceImpl implements CartAsyncService {
    @Autowired
    private CartInfoMapper cartInfoMapper;


    @Async
    public void deleteAsyncCart(QueryWrapper<CartInfo> wrapper) {
        cartInfoMapper.delete(wrapper);
    }
}
